package chapter_23_stragtegy.classic;

/**
 * Created by CharloYao on 2017/9/29.
 * 客户端，具体要使用哪个策略由客户端决定。
 * 缺点：客户端必须要了解所有的策略
 */
public class Client {
    public static void main(String[] args) {
        Context context = null;
        //执行策略1
        context = new Context(new ConcreateStrategy1());
        context.operation();
        //执行策略2
        context = new Context(new ConcreateStrategy2());
        context.operation();
    }

}
